package cloud.alibaba.study.entity.storage;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("t_storage")
public class Storage {
	
	@TableId(type = IdType.AUTO)
	private Long storageId;
	/**
	 * 产品id
	 */
	private Long productId;

	/**
	 * 总库存
	 */
	private Integer total;

	/**
	 * 已用库存
	 */
	private Integer used;

	/**
	 * 剩余库存
	 */
	private Integer residue;
	
	/**
	 * 预占库存
	 */
	private Integer reserved;
	
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;
}
